package com.star.carserviceapi.imp;

import android.content.Context;

import com.star.carserviceapi.IClientApi;
import com.star.carserviceapi.domain.BannerInfo;
import com.star.carserviceapi.domain.CarInfo;
import com.star.carserviceapi.domain.request.*;
import com.star.carserviceapi.domain.result.*;

public class ClientApiImp implements IClientApi {

	@SuppressWarnings("unused")
	private Context mContext = null;

	public ClientApiImp(Context context) {
		mContext = context;
	}

	public QryBannersResult qryBanners() {

		QryBannersResult result = new QryBannersResult();
		result.flagSuccess();

		// result.getBannerItems()
		// .add(new BannerInfo("title1", "http://baidu.com",
		// "http://img4.imgtn.bdimg.com/it/u=1671637302,3916409300&fm=23&gp=0.jpg"));
		// result.getBannerItems()
		// .add(new BannerInfo("title2", "http://baidu.com",
		// "http://img1.imgtn.bdimg.com/it/u=737095605,2626707934&fm=23&gp=0.jpg"));

		return result;

	}

	public QryCarResult qryCarsByUserId(String userId) {

		QryCarResult result = new QryCarResult();
		result.flagSuccess();

		result.getCars().add(new CarInfo("BMW X3", "3.0L"));
		result.getCars().add(new CarInfo("奥迪A8", "3.0L"));

		return result;
	}

	public QryLawsResult qryLawsByUserId(QryLawsRequest request) {

		QryLawsResult result = new QryLawsResult();
		result.flagSuccess();

		result.setLaws(1, 200, 3);

		return result;
	}

	public void sendCode() {

	}

	@Override
	public LoginResult login(LoginRequest request) {

		return new LoginResult().invoke(request);
	}

	@Override
	public SendValidCodeResult sendValidCodeRequest(SendValidCodeRequest request) {
		return new SendValidCodeResult().invoke(request);
	}

	@Override
	public QryCarBrandResult qryCarBrand(QryCarBrandRequest request) {

		return new QryCarBrandResult().invoke(request);
	}

	@Override
	public QryCarSeriesResult qryCarSeries(QryCarSeriesRequest request) {
		
		return new QryCarSeriesResult().invoke(request);
	}

	@Override
	public QryCarYearResult qryCarYear(QryCarYearRequest request) {
		
		return new QryCarYearResult().invoke(request);
	}

	@Override
	public QryCarModelResult qryCarModel(QryCarModelRequest request) {
		
		return new QryCarModelResult().invoke(request);
	}

	@Override
	public VerifyValidCodeResult verifyValidCode(VerifyValidCodeRequest request) {
		
		return new VerifyValidCodeResult().invoke(request);
	}

	@Override
	public CreateAccountResult createAccount(CreateAccountRequest request) {
		
		return new CreateAccountResult().invoke(request);
	}

	@Override
	public QryWeatherResult qryWeather(QryWeatherRequest request) {

		return new QryWeatherResult().invoke(request);
	}
}
